<script setup>
import {ElMessage} from 'element-plus'
import { get } from '@/utils/request.js'
import {userStore} from '@/stores/counter.js'
import router from '@/router'

const store=userStore()
if(store.auth.user==null){
get('/getUser',(message)=>{
store.auth.user = message.name
router.push('/index')
},()=>{
store.auth.user= null
})
}

</script>
<template>
    <router-view/>
</template>

<style scoped>

</style>
